#!/usr/bin/env bash

curl -X POST -H "Content-Type:application/json" \
-d '{"wifiId": "5fad31c3316744b3a03b84af19632823", "cbcEnable": false, "payload": "ddd"}' \
"http://localhost:5810/mqtt/auth"


curl -X POST -H "Content-Type:application/json" \
-d '{"subDomain": "24", "deviceId": "8650011000100010001000000244db09b200", "publicKey": "8e4b2f6f5fc5e764c38aba5f57a1fd04", "batchCode": "edwin1987"}' \
"http://localhost:5810/test/createOne"

curl -X POST -H "Content-Type:application/json" \
-d '8650011000100010001000000244db09b200' \
"http://localhost:5810/test/retriveByWifiId"


curl -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:221" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
-d '{"domain": "16", "subDomain": "221", "devices": [{"deviceId": "86505510007000400560000012e99fc52c03", "publicKey": "f2bf72248cc4fb39a9d997b5a3cbc481","batchCode":"edwin198701"}]}' \
"http://localhost:5814/zc-warehouse/v1/registerDevices"

curl -X POST -H "Content-Type:application/json" \
-d '333' \
"http://localhost:5810/test1/select"

curl -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:25" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
-d '{"domainId":"43"}' \
"http://localhost:5810/createSqlTable"


curl -X POST -H "Content-Type:application/x-zc-object" -H "x-zc-major-domain-id:16" -H "x-zc-sub-domain-id:25" -H "X-Zc-Timeout:9999999" -H "x-zc-developer-id:333" \
-d '{"physicalDeviceId": "8650011000100010001000000244db09aaaa"}' \
"http://localhost:5810/getPublicKey"


curl -X POST -H "Content-Type:application/json" \
-d '{"majorDomainId": "11", "subDomainId" : "2"}' \
"http://localhost:5810/basic-data/getInfoTotal"


curl -X POST -H "Content-Type:application/json" \
-d '{"majorDomainId": "11", "subDomainId" : "2"}' \
"http://localhost:5810/basic-data/getDeviceBySubDomain"

curl -X POST -H "Content-Type:application/json" \
-d 'zzzz' \
"http://localhost:5810/test"


curl -X POST -H "Content-Type:application/x-zc-object" \
-d '{"wifiId": "86505510007000400560000012e99fc52d80"}' \
"http://localhost:5810/getWifiStats"


curl -X POST -H "Content-Type:application/x-zc-object" \
-d '{"wifiId": "30020502b0cda838"}' \
"http://localhost:5810/getWifiStats"
#curl -XPOST -H "content-type:application/json" \
#-d '{"majorDomainId":9, "subDomainId":24, "physicalId": "30020502b0cda838", "status":1}' \
#"http://nlb-t3-9b92a6307327747e.elb.eu-central-1.amazonaws.com/api/cloud/onDeviceOnline"

curl -X POST -H "Content-Type:application/x-zc-object" \
-d '{"majorDomainId":9,"subDomainId":22,"physicalId":"1000f971b0b40408","payload":"A9kPQJZmAAAAAAMAJAAAyrc="}' \
"http://ac-mqtt-business:5810/setCmd"